package com.minimalist.common.entity.lindi.vo.subsidyapplicationpayrecord;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.entity.basic.vo.file.FileVO;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "林地指标交易平台_补贴申请支付记录实体")
public class LindiSubsidyApplicationPayRecordVO implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "补贴申请ID不能为空", groups = {Add.class, Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationId", description = "补贴申请ID", type = "string")
    private Long subsidyApplicationId;

    @NotNull(message = "补贴申请支付记录ID不能为空", groups = {Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyPayRecordId", description = "补贴申请支付记录ID", type = "string")
    private Long subsidyApplicationPayRecordId;

    @NotBlank(message = "支付类型不能为空", groups = {Add.class, Update.class})
    @Schema(name = "payType", description = "支付类型", type = "string")
    private String payType;

    @NotBlank(message = "支付金额不能为空", groups = {Add.class, Update.class})
    @Schema(name = "payMoney", description = "支付金额", type = "string")
    private String payMoney;

    @Schema(name = "payDate", description = "支付时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime payDate;

    @NotBlank(message = "支付方式不能为空", groups = {Add.class, Update.class})
    @Schema(name = "payMethod", description = "支付方式", type = "string")
    private String payMethod;

    @Schema(name = "fileId", description = "支付记录附件ID", type = "string")
    private Long fileId;
    @Schema(name = "file", description = "支付记录附件", type = "object")
    private FileVO file;

    @Schema(name = "remark", description = "备注", type = "string")
    private String remark;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationPayNoticeId", description = "补贴申请支付通知ID", type = "string")
    private Long subsidyApplicationPayNoticeId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationTownPaymentId", description = "补贴申请镇街支付明细ID", type = "string")
    private Long subsidyApplicationTownPaymentId;

    @Schema(name = "townName", description = "镇街名称", type = "string")
    private String townName;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "创建人ID", type = "string")
    private Long createId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "updateId", description = "更新人ID", type = "string")
    private Long updateId;

    @Schema(name = "createTime", description = "创建时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime createTime;

    @Schema(name = "updateTime", description = "更新时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime updateTime;

    // Constructors
    public LindiSubsidyApplicationPayRecordVO(){
    }

    public LindiSubsidyApplicationPayRecordVO(Long subsidyApplicationId, Long subsidyApplicationPayRecordId, String payType, String payMoney, LocalDateTime payDate, String payMethod, Long fileId, FileVO file, String remark, Long subsidyApplicationPayNoticeId, Long subsidyApplicationTownPaymentId, String townName, Long createId, Long updateId, LocalDateTime createTime, LocalDateTime updateTime){
        this.subsidyApplicationId = subsidyApplicationId;
        this.subsidyApplicationPayRecordId = subsidyApplicationPayRecordId;
        this.payType = payType;
        this.payMoney = payMoney;
        this.payDate = payDate;
        this.payMethod = payMethod;
        this.fileId = fileId;
        this.file = file;
        this.remark = remark;
        this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
        this.subsidyApplicationTownPaymentId = subsidyApplicationTownPaymentId;
        this.townName = townName;
        this.createId = createId;
        this.updateId = updateId;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    // Getters and Setters
    public Long getSubsidyApplicationId(){
        return subsidyApplicationId;
    }

    public void setSubsidyApplicationId(Long subsidyApplicationId){
        this.subsidyApplicationId = subsidyApplicationId;
    }

    public Long getSubsidyApplicationPayRecordId(){
        return subsidyApplicationPayRecordId;
    }

    public void setSubsidyApplicationPayRecordId(Long subsidyApplicationPayRecordId){
        this.subsidyApplicationPayRecordId = subsidyApplicationPayRecordId;
    }

    public String getPayType(){
        return payType;
    }

    public void setPayType(String payType){
        this.payType = payType;
    }

    public String getPayMoney(){
        return payMoney;
    }

    public void setPayMoney(String payMoney){
        this.payMoney = payMoney;
    }

    public LocalDateTime getPayDate(){
        return payDate;
    }

    public void setPayDate(LocalDateTime payDate){
        this.payDate = payDate;
    }

    public String getPayMethod(){
        return payMethod;
    }

    public void setPayMethod(String payMethod){
        this.payMethod = payMethod;
    }

    public Long getFileId(){
        return fileId;
    }

    public void setFileId(Long fileId){
        this.fileId = fileId;
    }

    public FileVO getFile(){
        return file;
    }

    public void setFile(FileVO file){
        this.file = file;
    }

    public String getRemark(){
        return remark;
    }

    public void setRemark(String remark){
        this.remark = remark;
    }

    public Long getSubsidyApplicationPayNoticeId(){
        return subsidyApplicationPayNoticeId;
    }

    public void setSubsidyApplicationPayNoticeId(Long subsidyApplicationPayNoticeId){
        this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
    }

    public Long getSubsidyApplicationTownPaymentId(){
        return subsidyApplicationTownPaymentId;
    }

    public void setSubsidyApplicationTownPaymentId(Long subsidyApplicationTownPaymentId){
        this.subsidyApplicationTownPaymentId = subsidyApplicationTownPaymentId;
    }

    public String getTownName(){
        return townName;
    }

    public void setTownName(String townName){
        this.townName = townName;
    }

    public Long getCreateId(){
        return createId;
    }

    public void setCreateId(Long createId){
        this.createId = createId;
    }

    public Long getUpdateId(){
        return updateId;
    }

    public void setUpdateId(Long updateId){
        this.updateId = updateId;
    }

    public LocalDateTime getCreateTime(){
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime){
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime(){
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime){
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        LindiSubsidyApplicationPayRecordVO that = (LindiSubsidyApplicationPayRecordVO) o;
        return Objects.equals(subsidyApplicationId, that.subsidyApplicationId) &&
                Objects.equals(subsidyApplicationPayRecordId, that.subsidyApplicationPayRecordId) &&
                Objects.equals(payType, that.payType) &&
                Objects.equals(payMoney, that.payMoney) &&
                Objects.equals(payDate, that.payDate) &&
                Objects.equals(payMethod, that.payMethod) &&
                Objects.equals(fileId, that.fileId) &&
                Objects.equals(file, that.file) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(subsidyApplicationPayNoticeId, that.subsidyApplicationPayNoticeId) &&
                Objects.equals(subsidyApplicationTownPaymentId, that.subsidyApplicationTownPaymentId) &&
                Objects.equals(townName, that.townName) &&
                Objects.equals(createId, that.createId) &&
                Objects.equals(updateId, that.updateId) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode(){
        return Objects.hash(subsidyApplicationId, subsidyApplicationPayRecordId, payType, payMoney, payDate, payMethod, fileId, file, remark, subsidyApplicationPayNoticeId, subsidyApplicationTownPaymentId, townName, createId, updateId, createTime, updateTime);
    }

    @Override
    public String toString(){
        return "LindiSubsidyApplicationPayRecordVO{" +
                "subsidyApplicationId=" + subsidyApplicationId +
                ", subsidyApplicationPayRecordId=" + subsidyApplicationPayRecordId +
                ", payType='" + payType + '\'' +
                ", payMoney='" + payMoney + '\'' +
                ", payDate=" + payDate +
                ", payMethod='" + payMethod + '\'' +
                ", fileId=" + fileId +
                ", file=" + file +
                ", remark='" + remark + '\'' +
                ", subsidyApplicationPayNoticeId=" + subsidyApplicationPayNoticeId +
                ", subsidyApplicationTownPaymentId=" + subsidyApplicationTownPaymentId +
                ", townName='" + townName + '\'' +
                ", createId=" + createId +
                ", updateId=" + updateId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
